import Vue from 'vue'

import Vuex from 'vuex'
import 'es6-promise/auto'

/* eslint-disable no-new */
Vue.use(Vuex);
export default new Vuex.Store({
  state: {
    count: 0,
    historyPro:localStorage.historyPro?localStorage.historyPro.split(','): []
  },
  mutations: {
    increment () {
      this.state.count = this.state.count +1;
    },
    historyProAdd(state,params){
      state.historyPro.push(params);
      localStorage.historyPro=state.historyPro;
    }
  }
})

